﻿using System.Linq.Expressions;
using Basic.FormModel.DB;
using Basic.FormRemoteModel.FormView.Model;
using WeDonekRpc.SqlSugar.VirtualQuery;

namespace Basic.FormCollect
{
    public interface IFormViewCollect
    {
        long Add ( FormViewAdd data );
        bool CheckIsGenerate ( long formId );
        void Delete ( DBFormView source, string name );
        DBFormView Find ( long formId );
        Result Find<Result> ( long formId, Expression<Func<DBFormView, Result>> selector );

        Result Find<Result> ( long formId ) where Result : class, new();
        void GenerateView ( DBFormView sour, string name, QueryStruct body );
        DBFormView Get ( long id );
        bool Update ( DBFormView source, FormViewSet set );
    }
}